<template>
    <div>
        <el-cascader
                :options="options"
                :props="{ checkStrictly: true ,value:'id',label:'name'}"
                clearable></el-cascader>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                options: []
            }
        },
        methods:{
            toQuery(){
                this.$http.get("/dept/findtreedepartment").then(res=>{
                    console.log(JSON.stringify(res.data))
                    this.options = res.data;
                })
            }
        },
        mounted() {
            this.toQuery();
        }
    }
</script>